package com.enki.cigarettes.enums;

/**
 * @author glory
 * @version V1.0
 * @Package com.enki.cigarettes.enums
 * @Name ExpressDeliveryEnums
 * @Description: TODO (用一句话描述该文件做什么)
 * @date 2019/06/23 23:16:14
 */
public class ExpressDeliveryEnums {
    /**
     * 常用快递枚举
     */
    public enum ExpressDelivery {
        gtsd("高铁速递", "gtsd"),
        shunfeng("顺丰速运", "shunfeng"),
        yunda("韵达速递", "yunda"),
        gnxb("邮政小包", "gnxb"),
        baishi("百世快递", "huitong"),
        bsky("百世快运", "bsky"),
        shentong("申通快递", "shentong"),
        huitong("汇通快递", "huitong"),
        kuaijie("快捷速递", "kuaijie"),
        debang("德邦物流", "debang"),
        anneng("安能物流", "anneng"),
        rufeng("如风达快递", "rufeng"),
        tiantian("天天快递", "tiantian"),
        datian("大田物流", "datian"),
        yuantong("圆通速递", "yuantong"),
        guotong("国通快递", "guotong"),
        quanfeng("全峰快递", "quanfeng"),
        yousu("优速快递", "yousu"),
        jingdong("京东快递", "jingdong"),
        zhongtong("中通快递", "zhongtong"),
        pingyou("中国邮政快递", "pingyou"),
        tnt("TNT快递", "tnt"),
        ems("EMS", "ems");

        private String name;
        private String type;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        ExpressDelivery(String name, String type) {
            this.name = name;
            this.type = type;
        }

        public static String getType(String name) {
            for (ExpressDelivery delivery : ExpressDelivery.values()) {
                if (delivery.getName().equals(name)) {
                    return delivery.getType();
                }
            }
            return "";
        }
    }


}
